package xx.excel.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import xx.excel.controller.respVo.UserDeptVo;
import xx.excel.entity.User;

import java.util.List;

/**
 * (User)表数据库访问层
 *
 * @author halo-king
 * @since 2023-05-05 17:20:41
 */
@Mapper
public interface UserDao extends BaseMapper<User> {

    @Select(" select t1.user_id,t1.user_name,t1.age,t1.address,t1.create_time,t2.dept_name from user t1 left join dept t2 on t1.dept_id = t2.id ")
    List<UserDeptVo> queryUserDept();
}
